from ..extensions import db
from ._utils import get_auto_schema


class TransferModel(db.Model):
    __tablename__ = 't_transfer'

    id = db.Column(db.String(50), primary_key=True)
    name = db.Column(db.String(50))  # 文件上传原始名称
    code = db.Column(db.String(50))  # 文件简码
    create_at = db.Column(db.String(50))  # 上传日期
    size = db.Column(db.String(50))  # 文件大小
    download_count = db.Column(db.Integer, default=0)  # 下载统计


TransferSchema = get_auto_schema(TransferModel)
